package com.csust.travel.mapper;

import com.csust.travel.entity.TransactionReport;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface TransactionReportMapper {

    @Select("SELECT name,COUNT(b.id) as value FROM transactions t,books b WHERE t.books_id = b.id GROUP BY b.id ORDER BY COUNT(b.id)")
    List<TransactionReport> findNameAndNumber();
}
